/**
 * 
 */
package org.dragonfire.dasm.directives;

import java.util.ArrayList;

import org.dragonfire.dasm.Command;
import org.dragonfire.dasm.Listing;
import org.dragonfire.dasm.DirectiveManager.Directive;

/**
 * The <code>#BLOCK</code> directive creates a series of zero-bytes for the
 * specified length.<br />
 * <br />
 * Format:<br />
 * <code>#BLOCK <i>&lt;length&gt;</i></code><br />
 * <br />
 * Parameters:<br />
 * <table>
 * <tr>
 * <td><code>length</code></td>
 * <td>(Integer) The size of the block in bytes.</td>
 * </tr>
 * </table><br />
 * Errors:<br />
 * <table>
 * <tr>
 * <td><code>ERROR_NOT_ENOUGH_ARGS</code></td>
 * <td>Thrown if <code>length</code> is zero.</td>
 * </tr>
 * <tr>
 * <td><code>ERROR_INT_REQUIRED</code></td>
 * <td>Thrown if <code>length</code> isn't an integer.</td>
 * </tr>
 * </table>
 * 
 * @see org.dragonfire.dasm.directives.Fill
 * @author Darth Android
 * @version 2.0
 */
public class Block extends Directive {

	/**
	 * {@inheritDoc}
	 */
	@Override
	public ArrayList<Listing> pass1(Command c) {
		// simply a modified alias to fill
		return getDM().pass1(new Command("#FILL", c.getParam(0) + ",0"));
	}
}
